import request from "@/utils/request.js";

/**
 * 获取当日搜索热点
 */
export const getHot = function() {
	return request.get("search/hot");
}

/**
 * 搜索
 * @param {Object} data
 */
export const searchAll = function(data) {
	return request.get("search/all", data);
}

/**
 * 根据分类获取相应文章
 * @param {Object} data
 */
export const searchByCategory = function(data) {
	return request.get("search/category", data);
}

/**
 * 获取非登录用户的文章
 * @param {Object} userid
 * @param {Object} data
 */
export const getUserArticles = function(userid, data) {
	return request.get("search/" + userid, data);
}